\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s}{
\section{Zebulon::GPS::DGPS Class Reference}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s}\index{Zebulon::GPS::DGPS@{Zebulon::GPS::DGPS}}
}


Simple Differential \hyperlink{namespace_g_p_s}{GPS} class which reads incomming \hyperlink{namespace_n_m_e_a}{NMEA} messages from a \hyperlink{namespace_g_p_s}{GPS} device over a serial connection.  


{\ttfamily \#include $<$dgps.h$>$}\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_1_1_callback}{Callback}
\begin{DoxyCompactList}\small\item\em \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_1_1_callback}{Callback} class used to register for message events. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ae277c069c40e1a682e6453a2e8a440a7}{
typedef std::set$<$ NMEA::Message::Type $>$ {\bfseries TypeSet}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ae277c069c40e1a682e6453a2e8a440a7}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a3951982a0d64d563b1121aa3f58ec8e3}{
typedef std::list$<$ \hyperlink{class_zebulon_1_1_n_m_e_a_1_1_message}{NMEA::Message} $\ast$ $>$ {\bfseries MessageList}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a3951982a0d64d563b1121aa3f58ec8e3}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ab14031620f9207ba65d1df5eea4b0dc9}{
typedef std::vector$<$ \hyperlink{class_zebulon_1_1_n_m_e_a_1_1_message}{NMEA::Message} $\ast$ $>$ {\bfseries MessageVector}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ab14031620f9207ba65d1df5eea4b0dc9}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ab60ef081b25ee9560a59f0232f3e9761}{
typedef std::set$<$ \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_1_1_callback}{DGPS::Callback} $\ast$ $>$ {\bfseries CallbackSet}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ab60ef081b25ee9560a59f0232f3e9761}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_acba34644b7fc3e4b2b055765a1988b1b}{
int {\bfseries Initialize} (const std::string \&xml)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_acba34644b7fc3e4b2b055765a1988b1b}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4e78611a865e81b6a57fbaed763013c0}{
int {\bfseries Initialize} (const std::string \&port, const unsigned int ibaud, const bool tryOtherBauds=true, const unsigned int timout=1000)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4e78611a865e81b6a57fbaed763013c0}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a8b50f112a09713f9795eb86916a434cb}{
int {\bfseries Shutdown} ()}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a8b50f112a09713f9795eb86916a434cb}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a8de14b4187c06adff8d55108e361dcb7}{
int {\bfseries RegisterCallback} (\hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_1_1_callback}{DGPS::Callback} $\ast$cb)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a8de14b4187c06adff8d55108e361dcb7}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ae265ffe02e3bc7197a32b354b72e16d1}{
int {\bfseries RemoveCallback} (\hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_1_1_callback}{DGPS::Callback} $\ast$cb)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ae265ffe02e3bc7197a32b354b72e16d1}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ad121c3e4f68bd613ff7e44f77d183125}{
int {\bfseries SetMessageTypes} (const DGPS::TypeSet types)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ad121c3e4f68bd613ff7e44f77d183125}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a670727a5a036bcfdbc72f2b63eb6b7ce}{
int {\bfseries AddMessageType} (const NMEA::Message::Type type)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a670727a5a036bcfdbc72f2b63eb6b7ce}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a1eed469165998cc2442e65543b6d54b9}{
int {\bfseries RemoveMessageType} (const NMEA::Message::Type type)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a1eed469165998cc2442e65543b6d54b9}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a47e8142d38c35ef15bf2487190dd1570}{
int {\bfseries SetMaximumListSize} (const unsigned int size)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a47e8142d38c35ef15bf2487190dd1570}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a8bb2f0142244a7a03119f82e0c56309a}{
virtual void {\bfseries ProcessMessage} (const \hyperlink{class_zebulon_1_1_n_m_e_a_1_1_message}{NMEA::Message} $\ast$msg)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a8bb2f0142244a7a03119f82e0c56309a}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_afeb8abefcbd18e75530729531672c401}{
bool {\bfseries IsConnected} () const }
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_afeb8abefcbd18e75530729531672c401}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a6a04e9a7f2fbe4367fc8999aea303e3c}{
bool {\bfseries HaveSignal} () const }
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a6a04e9a7f2fbe4367fc8999aea303e3c}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa231efbe93a677d1d64cc87f68c2187d}{
bool {\bfseries LostSignal} () const }
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa231efbe93a677d1d64cc87f68c2187d}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a1461975d8a492ad91b4f6abe393c9b00}{
unsigned int {\bfseries GetMaximumListSize} () const }
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a1461975d8a492ad91b4f6abe393c9b00}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4dcb50e4bc313aba072efa6e0d197104}{
\hyperlink{class_zebulon_1_1_n_m_e_a_1_1_message}{NMEA::Message} $\ast$ {\bfseries GetLastMessage} () const }
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4dcb50e4bc313aba072efa6e0d197104}

\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a7e6346f9f24603db4279efd7fd6fd4a1}{
DGPS::MessageVector {\bfseries GetMessages} (const unsigned int num=1) const }
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a7e6346f9f24603db4279efd7fd6fd4a1}

\end{DoxyCompactItemize}
\subsection*{Static Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_af26ec377be0350afa9a0898da77bcb33}{
static void {\bfseries SerialThread} (void $\ast$args)}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_af26ec377be0350afa9a0898da77bcb33}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa4a356d6f9ef5bfb4efbfaead4789e4f}{
volatile bool \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa4a356d6f9ef5bfb4efbfaead4789e4f}{mConnectedFlag}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa4a356d6f9ef5bfb4efbfaead4789e4f}

\begin{DoxyCompactList}\small\item\em Connected and receiving \hyperlink{namespace_n_m_e_a}{NMEA} messages. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a037f359efb81a730554c2a2ae4df888b}{
volatile bool \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a037f359efb81a730554c2a2ae4df888b}{mHaveSignalFlag}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a037f359efb81a730554c2a2ae4df888b}

\begin{DoxyCompactList}\small\item\em Flag used to check for valid \hyperlink{namespace_g_p_s}{GPS} data. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa8abfd879a071be825d7b690068d3624}{
volatile bool \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa8abfd879a071be825d7b690068d3624}{mRunningFlag}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa8abfd879a071be825d7b690068d3624}

\begin{DoxyCompactList}\small\item\em Thread is running? \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a6e248ff7077ad87fbd146df78283b012}{
volatile unsigned int \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a6e248ff7077ad87fbd146df78283b012}{mListSize}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a6e248ff7077ad87fbd146df78283b012}

\begin{DoxyCompactList}\small\item\em Maximum number of messages to store in list. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4f61b9a5a05fc1ac2d66a387c53bd10b}{
CxUtils::Mutex \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4f61b9a5a05fc1ac2d66a387c53bd10b}{mSerialMutex}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4f61b9a5a05fc1ac2d66a387c53bd10b}

\begin{DoxyCompactList}\small\item\em Mutex for data protection in thread. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a5b995e88872c1f787e893669472e3898}{
CxUtils::Mutex \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a5b995e88872c1f787e893669472e3898}{mCallbackMutex}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a5b995e88872c1f787e893669472e3898}

\begin{DoxyCompactList}\small\item\em Mutex for callbacks. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a9881eeed19b18229053c0f4d8ee1a185}{
CxUtils::Serial \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a9881eeed19b18229053c0f4d8ee1a185}{mSerialPort}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a9881eeed19b18229053c0f4d8ee1a185}

\begin{DoxyCompactList}\small\item\em Connects to the serial port for receiving. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ad8559f0669e2a6201f04fa1e49b37668}{
CxUtils::Thread \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ad8559f0669e2a6201f04fa1e49b37668}{mSerialThread}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_ad8559f0669e2a6201f04fa1e49b37668}

\begin{DoxyCompactList}\small\item\em Thread for continuously receiving \hyperlink{namespace_n_m_e_a}{NMEA} messages. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4f7c57141bc0fd69a6a21242e9860080}{
CxUtils::Wgs \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4f7c57141bc0fd69a6a21242e9860080}{mPosition}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_a4f7c57141bc0fd69a6a21242e9860080}

\begin{DoxyCompactList}\small\item\em Current \hyperlink{namespace_g_p_s}{GPS} position. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aee9c618060c522c4aad5378231fce788}{
TypeSet \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aee9c618060c522c4aad5378231fce788}{mMessageTypes}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aee9c618060c522c4aad5378231fce788}

\begin{DoxyCompactList}\small\item\em Types of messages to listen for (all others ignored). \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_adf51d62e067825010cc8f58b424f8a26}{
MessageList \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_adf51d62e067825010cc8f58b424f8a26}{mMessages}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_adf51d62e067825010cc8f58b424f8a26}

\begin{DoxyCompactList}\small\item\em List of all messages from \hyperlink{namespace_g_p_s}{GPS}. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa94557b1333a4936889435d1e7c62655}{
CallbackSet \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa94557b1333a4936889435d1e7c62655}{mCallbacks}}
\label{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_aa94557b1333a4936889435d1e7c62655}

\begin{DoxyCompactList}\small\item\em Set of all callbacks to run when message received. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Simple Differential \hyperlink{namespace_g_p_s}{GPS} class which reads incomming \hyperlink{namespace_n_m_e_a}{NMEA} messages from a \hyperlink{namespace_g_p_s}{GPS} device over a serial connection. It is possible to configure this interface to only listen for specific types of messages. By default it only listens for GPGGA \hyperlink{namespace_n_m_e_a}{NMEA} messages, so use the AddMessageType method to add more. 

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/gps/include/gps/\hyperlink{dgps_8h}{dgps.h}\end{DoxyCompactItemize}
